import React from 'react'
import { useParams, useSearchParams } from 'react-router-dom'
export default function Article() {
  const { id, name, user } = useParams()
  const [param] = useSearchParams()
  const id1 = param.get('id')
  const name1 = param.get('name')
  const user1 = param.get('user')
  return (
    <div>
      我是文章页的{id}-{name}-{user}<br />
      用usesearchparams请求的{id1}-{name1}-{user1}
    </div>
  )
}
